oracle.hadoop.balancer.examples.invindx

## Class InvertedIndexMapred.InvertedIndexMapper

- java.lang.Object
- - org.apache.hadoop.mapred.MapReduceBase
  - - oracle.hadoop.balancer.examples.invindx.InvertedIndexMapred.InvertedIndexMapper

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>
  Enclosing class:
    InvertedIndexMapred

      public static class InvertedIndexMapred.InvertedIndexMapper
      extends org.apache.hadoop.mapred.MapReduceBase
      implements org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>

  Inverted Index mapper class for `TextInputFormat` and `FileSplit` This class uses the file name obtained from `FileSplit` as the location of the word, and the value of the LongWritable key of `TextInputFormat` as the offset of the word in that file.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvertedIndexMapred.InvertedIndexMapper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(org.apache.hadoop.mapred.JobConf job)`
    `void` | `map(org.apache.hadoop.io.LongWritable keyIn, org.apache.hadoop.io.Text valueIn, org.apache.hadoop.mapred.OutputCollector<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue> collector, org.apache.hadoop.mapred.Reporter reporter)`

    - ### Methods inherited from class org.apache.hadoop.mapred.MapReduceBase

      `close`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.io.Closeable

      `close`

- - ### Constructor Detail

    - #### InvertedIndexMapred.InvertedIndexMapper

          public InvertedIndexMapred.InvertedIndexMapper()

  - ### Method Detail

    - #### configure

          public void configure(org.apache.hadoop.mapred.JobConf job)

      Specified by:
        `configure` in interface `org.apache.hadoop.mapred.JobConfigurable`
      Overrides:
        `configure` in class `org.apache.hadoop.mapred.MapReduceBase`

    - #### map

          public void map(org.apache.hadoop.io.LongWritable keyIn,
                 org.apache.hadoop.io.Text valueIn,
                 org.apache.hadoop.mapred.OutputCollector<InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue> collector,
                 org.apache.hadoop.mapred.Reporter reporter)
                   throws java.io.IOException

      Specified by:
        `map` in interface `org.apache.hadoop.mapred.Mapper<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text,InvertedIndex.InvertedIndexKey,InvertedIndex.InvertedIndexValue>`
      Throws:
        `java.io.IOException`

Copyright © 2013, 2014, Oracle and/or its affiliates. All rights reserved.